﻿using System.Collections.Generic;
using System.Threading.Tasks;
using StudentManager.Data.Model;

namespace StudentManager.API.BLL
{
    public interface IZbUserInfoBLL
    {
        /// <summary>
        /// 根据ID获取用户信息
        /// </summary>
        Task<ZbUserInfo> GetUserByIdAsync(int id);

        /// <summary>
        /// 添加用户
        /// </summary>
        Task<int> AddUserAsync(ZbUserInfo user);

        /// <summary>
        /// 更新用户信息
        /// </summary>
        Task<bool> UpdateUserAsync(ZbUserInfo user);

        /// <summary>
        /// 删除用户
        /// </summary>
        Task<bool> DeleteUserAsync(int id);

        /// <summary>
        /// 分页查询用户列表
        /// </summary>
        Task<(IEnumerable<ZbUserInfo> Users, int TotalCount)> GetPagedListAsync(int pageIndex, int pageSize, string searchKey = "");
    }
}